local varlist denom no_shares size totass_MEAN fxassratio_MEAN leverage_MEAN DE_MEAN ROA_MEAN age1900 asage1900 founderfirm

* Compare groups by existence of a board
qui estpost ttest `varlist', by(DR) unequal
esttab using ./Output/Table1_DR.txt, ///
        wide cells("mu_1(fmt(3)) mu_2 b(star) p")  starlevels(+ 0.15 * 0.10 ** 0.05 *** 0.01) ///
        label collabels("W/o board" "W board" "Difference" "p-value") ///
        nonumber nomtitle noobs replace


est clear
foreach var in `varlist' {
qui by DR, sort: eststo: mean `var' 
esttab using ./Output/Table1_DRse.txt, ///
    cells("se(par fmt(%9.3fc))")  nostar nonumber  ///
    label  mtitles("W/o board" "W board") nonote noobs  append
    est clear
} 



* Compare groups by small- and large denomination
local varlist DR denom no_shares size totass_MEAN fxassratio_MEAN leverage_MEAN DE_MEAN ROA_MEAN age1900 asage1900 founderfirm

* Compare groups by existence of a board
qui estpost ttest `varlist', by(LD) unequal
esttab using ./Output/Table1_LD.txt, ///
        wide cells("mu_1(fmt(3)) mu_2 b(star) p")  starlevels(+ 0.15 * 0.10 ** 0.05 *** 0.01) ///
        label collabels("SD" "LD" "Difference" "p-value") ///
        nonumber nomtitle noobs replace


est clear
foreach var in `varlist' {
qui by LD, sort: eststo: mean `var' 
esttab using ./Output/Table1_LDse.txt, ///
    cells("se(par fmt(%9.3fc))")  nostar nonumber  ///
    label  mtitles("SD" "LD") nonote noobs append 
    est clear
} 
